<?php
date_default_timezone_set("PRC"); //timezone
$conn = @mysql_connect("localhost","root","root");
if (!$conn){
    die("Could not connect£º" . mysql_error());
}

mysql_select_db("faithwar", $conn);
mysql_query("set names 'UTF-8'"); 
$dateTime = date("Y-m-d");


$sql = "UPDATE faithwar_query_temp SET firstlogindata= '$dateTime',firstlogin ='$dateTime' where firstlogin ='0000-00-00'";

if(mysql_query($sql,$conn)){
    echo "1 update is ok!";
} else {
    echo "failed£º".mysql_error();
}

?>